/*
 * @Descripttion: 
 * @version: 
 * @Author: ldh
 * @Date: 2020-05-16 17:04:25
 * @LastEditors: ldh
 * @LastEditTime: 2020-07-05 17:23:41
 */ 
// import {test} from '../api/index.js'
import store from '../store/index'
import create from '../store/create'

create(store,{
  onShow(){
    // this.$api.test2().then(res=>console.log(res)).catch(err=>console.log(err))
    this.$api.test5().then(res=>{
      console.log(res)
    }).catch(err=>{
      console.log(err)
    })
    // this.$api.test5()
    // this.$api.test5()
      if (typeof this.getTabBar === 'function' &&
        this.getTabBar()) {
        this.getTabBar().setData({
          selected: 1
        })
      }
  }
})

// Component({
//   pageLifetimes: {
//     show() {
//       test().then(res=>console.log(res)).catch(err=>console.log(err))
//       if (typeof this.getTabBar === 'function' &&
//         this.getTabBar()) {
//         this.getTabBar().setData({
//           selected: 1
//         })
//       }
//     }
//   }
// })
